package model.trajectory;

import java.util.ArrayList;

import model.DoorModel;
import model.path.Point4D;

import utils.TimeIntervalle;

public class TransitionTrajectoryModel extends BaseTrajectoryModel
{
	public DoorModel door;
	public boolean reverse;
	
	public TransitionTrajectoryModel(TrajectoryModel parent,
			TimeIntervalle intervalle, ArrayList<Point4D> positions, DoorModel door, boolean reverse) 
	{
		super(parent, intervalle, positions);
		this.door = door;
		this.reverse = reverse;	
	}
	
	@Override
	public String toSaveText() 
	{
		String text = "";

		text += (intervalle.beginTime+1) + ";" + "transition;" + door.getID() +";"+ reverse +";"+positions.get(1).x() + ";" + positions.get(1).y()+";\n";

		// TODO Auto-generated method stub
		return text;
	}
	
	public String toString()
	{
		return "transition:" + this.door.getID(); 
	}
}
